<!doctype html>
<html lang="zh-cn" dir="ltr">
 <head> 
  <meta charset="UTF-8"> 
  <title>Wi-Fi硬件鉴权协议接口说明 - 微信公众平台开发者文档</title> 
  <meta name="generator" content="MediaWiki 1.17.0"> 
  <link rel="shortcut icon" href="../static/assets/b6e57135e9c7167976dba80b3b09b546.jpg"> 
  <link rel="search" type="application/opensearchdescription+xml" href="../7/62453c80507e836458b441eae4358bdf.html" title="微信公众平台开发者文档 (zh-cn)"> 
  <link rel="alternate" type="application/atom+xml" title="微信公众平台开发者文档的Atom订阅" href="../0/594277f21545345653eb965322ac4b04.html"> 
  <link rel="stylesheet" href="../static/02da6b362196e50cd396d4117c7fa3ea.css"> 
  <meta name="keywords" content="微信公众平台开发者文档,微信小店接口,设备功能接口,Weixin JS接口,分组管理接口">
  <meta name="description" content="公众平台是为微信用户提供服务的平台，而公众平台开发接口则是提供服务的基础，开发者在公众平台网站中创建公众号、获取接口权限后，可以通过阅读本接口文档来帮助开发。">
  <meta name="ResourceLoaderDynamicStyles" content=""> 
  <!--[if lt IE 7]><style type="text/css">body{behavior:url("/wiki/skins/vector/csshover.min.htc")}</style><![endif]-->
 </head> 
 <body class="mediawiki ltr ns-0 ns-subject page-Wi-Fi硬件鉴权协议接口说明 skin-vector"> 
  <!--网站头部--> 
  <script type="text/javascript" src="../static/021402488e80774f4bae632d50abd818.js"></script> 
  <script>
	function parseURL(){
		var res = {}, search = location.search;
		if (search.indexOf("?") != 0){
			return res;
		}
		search = search.substr(1).split("&");
		for (var i = 0; i < search.length; ++i){
			var 
				item = search[i],
				idx = item.indexOf("="),
				k = item.substr(0, idx),
				v = item.substr(idx+1);
			res[k] = v;
		}
		return res;
	}

	var params = parseURL();
	$(function(){
		$(".portal").each(function(){
			var portal = $(this), as = portal.find('a');

			as.each(function(){
				var a = $(this), title = a.html();

				if (decodeURIComponent(title) == decodeURIComponent(params['title'])){
					portal.addClass("active").find(".body").show();
					a.addClass("selected");
				}
			});
		})
	});
</script> 
  <div class="headWrap"> 
   <div class="header" id="header"> 
    <div class="inner"> 
     <a class="logo" href="../home/index.html"><img src="../static/assets/dc5de672083b2ec495408b00b96c9aab.png" alt="微信公众平台开发者文档"></a> 
    </div> 
   </div> 
  </div>  
  <script type="text/javascript" src="../static/2ef2bdf6ac1839ee639cb15463231282.js"></script> 
  <!--[if IE 6]>
<style type="text/css">
html{background-image:url(about:blank);background-attachment:fixed;}
#content{overflow-x:hidden;}
.bottomnav{position:absolute;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-30));}
</style>
<![endif]--> 
  <!--网站头部--> 
  <div id="mw-page-base" class="noprint"></div> 
  <div id="mw-head-base" class="noprint"></div> 
  <div class="mainwrapper"> 
   <div class="inner"> 
    <!-- panel --> 
    <div id="mw-panel" class="noprint"> 
     <!-- 
						<div id="p-logo"><a style="background-image: url(/wiki/skins/common/images/logo.jpg);" href="/wiki/index.php?title=%E9%A6%96%E9%A1%B5"  title="访问首页"></a></div>
					
					<form class="searchform">
						<input type="text"   name="search" placeholder="搜索关键字 [alt-s]" accesskey="s" class="searchform_text"/>
						<input type="submit" name="fulltext" value="搜索" title="搜索该文字的页面" class="searchform_btn"/>
					</form>
					 --> 
     <!-- 开始前必读 --> 
     <div class="portal" id="p-.E5.BC.80.E5.A7.8B.E5.89.8D.E5.BF.85.E8.AF.BB"> 
      <h5><span class="portal_arrow"></span>开始前必读</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.9B.B4.E6.96.B0.E6.97.A5.E5.BF.97"><a href="../0/4c93e31f953f24a42b921d2ae8d4e5e0.html">更新日志</a></li> 
        <li id="n-.E5.BC.80.E5.8F.91.E8.80.85.E8.A7.84.E8.8C.83"><a href="../16/52e198333f5c127ddd5c45e875191b14.html">开发者规范</a></li> 
        <li id="n-.E5.85.AC.E4.BC.97.E5.8F.B7.E6.8E.A5.E5.8F.A3.E6.9D.83.E9.99.90.E8.AF.B4.E6.98.8E"><a href="../13/8d4957b72037e3308a0ca1b21f25ae8d.html">公众号接口权限说明</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E9.A2.91.E7.8E.87.E9.99.90.E5.88.B6.E8.AF.B4.E6.98.8E"><a href="../7/85eff372c164ddc66c47777dc972279f.html">接口频率限制说明</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E8.BF.94.E5.9B.9E.E7.A0.81.E8.AF.B4.E6.98.8E"><a href="../10/6380dc743053a91c544ffd2b7c959166.html">接口返回码说明</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /开始前必读 --> 
     <!-- 开始开发 --> 
     <div class="portal" id="p-.E5.BC.80.E5.A7.8B.E5.BC.80.E5.8F.91"> 
      <h5><span class="portal_arrow"></span>开始开发</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.8E.A5.E5.85.A5.E6.8C.87.E5.8D.97"><a href="../8/f9a0b8382e0b77d87b3bcc1ce6fbc104.html">接入指南</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E6.8E.A5.E5.8F.A3.E8.B0.83.E7.94.A8.E5.87.AD.E6.8D.AE"><a href="../14/9f9c82c1af308e3b14ba9b973f99a8ba.html">获取接口调用凭据</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.BE.AE.E4.BF.A1.E6.9C.8D.E5.8A.A1.E5.99.A8IP.E5.9C.B0.E5.9D.80"><a href="../4/41ef0843d6e108cf6b5649480207561c.html">获取微信服务器IP地址</a></li> 
        <li id="n-.E6.8A.A5.E8.AD.A6.E6.8E.92.E6.9F.A5.E6.8C.87.E5.BC.95"><a href="../7/c478375fae59150b26def82ec061f43b.html">报警排查指引</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E6.B5.8B.E8.AF.95.E5.8F.B7.E7.94.B3.E8.AF.B7"><a href="http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login">接口测试号申请</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E5.9C.A8.E7.BA.BF.E8.B0.83.E8.AF.95"><a href="http://mp.weixin.qq.com/debug/">接口在线调试</a></li> 
        <li id="n-.E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><a href="http://mp.weixin.qq.com/qa">常见问题</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /开始开发 --> 
     <!-- 自定义菜单 --> 
     <div class="portal" id="p-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95"> 
      <h5><span class="portal_arrow"></span>自定义菜单</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E5.88.9B.E5.BB.BA.E6.8E.A5.E5.8F.A3"><a href="../10/0234e39a2025342c17a7d23595c6b40a.html">自定义菜单创建接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E6.9F.A5.E8.AF.A2.E6.8E.A5.E5.8F.A3"><a href="../5/f287d1a5b78a35a8884326312ac3e4ed.html">自定义菜单查询接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E5.88.A0.E9.99.A4.E6.8E.A5.E5.8F.A3"><a href="../3/de21624f2d0d3dafde085dafaa226743.html">自定义菜单删除接口</a></li> 
        <li id="n-.E8.87.AA.E5.AE.9A.E4.B9.89.E8.8F.9C.E5.8D.95.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../19/a037750e2df0261ab0a84899d16abd33.html">自定义菜单事件推送</a></li> 
        <li id="n-.E4.B8.AA.E6.80.A7.E5.8C.96.E8.8F.9C.E5.8D.95.E6.8E.A5.E5.8F.A3"><a href="../0/c48ccd12b69ae023159b4bfaa7c39c20.html">个性化菜单接口</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.85.AC.E4.BC.97.E5.8F.B7.E7.9A.84.E8.8F.9C.E5.8D.95.E9.85.8D.E7.BD.AE"><a href="../14/293d0cb8de95e916d1216a33fcb81fd6.html">获取公众号的菜单配置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /自定义菜单 --> 
     <!-- 消息管理 --> 
     <div class="portal" id="p-.E6.B6.88.E6.81.AF.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>消息管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.8E.A5.E6.94.B6.E6.B6.88.E6.81.AF-.E6.8E.A5.E6.94.B6.E6.99.AE.E9.80.9A.E6.B6.88.E6.81.AF"><a href="../17/f298879f8fb29ab98b2f2971d42552fd.html">接收消息-接收普通消息</a></li> 
        <li id="n-.E6.8E.A5.E6.94.B6.E6.B6.88.E6.81.AF-.E6.8E.A5.E6.94.B6.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../7/9f89d962eba4c5924ed95b513ba69d9b.html">接收消息-接收事件推送</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E8.A2.AB.E5.8A.A8.E5.9B.9E.E5.A4.8D.E6.B6.88.E6.81.AF"><a href="../1/6239b44c206cab9145b1d52c67e6c551.html">发送消息-被动回复消息</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E8.A2.AB.E5.8A.A8.E5.9B.9E.E5.A4.8D.E6.97.B6.E7.9A.84.E5.8A.A0.E8.A7.A3.E5.AF.86"><a href="../14/70e73cedf9fd958d2e23264ba9333ad2.html">发送消息-被动回复时的加解密</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E5.AE.A2.E6.9C.8D.E6.B6.88.E6.81.AF"><a href="../11/c88c270ae8935291626538f9c64bd123.html">发送消息-客服消息</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E7.BE.A4.E5.8F.91.E6.8E.A5.E5.8F.A3"><a href="../15/40b6865b893947b764e2de8e4a1fb55f.html">发送消息-群发接口</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E6.A8.A1.E6.9D.BF.E6.B6.88.E6.81.AF.E6.8E.A5.E5.8F.A3"><a href="../5/6dde9eaa909f83354e0094dc3ad99e05.html">发送消息-模板消息接口</a></li> 
        <li id="n-.E5.8F.91.E9.80.81.E6.B6.88.E6.81.AF-.E6.A8.A1.E6.9D.BF.E6.B6.88.E6.81.AF.E8.BF.90.E8.90.A5.E8.A7.84.E8.8C.83"><a href="../18/8ecd0dfc9acafb2ed86ac3ae8f7c69aa.html">发送消息-模板消息运营规范</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.85.AC.E4.BC.97.E5.8F.B7.E8.87.AA.E5.8A.A8.E5.9B.9E.E5.A4.8D.E9.85.8D.E7.BD.AE"><a href="../8/806878e1fc2b9e9aa618ae33896b04c4.html">获取公众号自动回复配置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /消息管理 --> 
     <!-- 微信网页开发 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E5.BC.80.E5.8F.91"> 
      <h5><span class="portal_arrow"></span>微信网页开发</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E6.8E.88.E6.9D.83"><a href="../4/9ac2e7b1f1d22e9e57260f6553822520.html">微信网页授权</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E7.BD.91.E9.A1.B5.E5.BC.80.E5.8F.91.E6.A0.B7.E5.BC.8F.E5.BA.93"><a href="../2/ae9782fb42e47ad79eb7b361c2149d16.html">微信网页开发样式库</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1JS-SDK"><a href="../11/74ad127cc054f6b80759c40f77ec03db.html">微信JS-SDK</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1Web.E5.BC.80.E5.8F.91.E8.80.85.E5.B7.A5.E5.85.B7"><a href="../10/e5f772f4521da17fa0d7304f68b97d7e.html">微信Web开发者工具</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信网页开发 --> 
     <!-- 素材管理 --> 
     <div class="portal" id="p-.E7.B4.A0.E6.9D.90.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>素材管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.96.B0.E5.A2.9E.E4.B8.B4.E6.97.B6.E7.B4.A0.E6.9D.90"><a href="../15/2d353966323806a202cd2deaafe8e557.html">新增临时素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E4.B8.B4.E6.97.B6.E7.B4.A0.E6.9D.90"><a href="../9/677a85e3f3849af35de54bb5516c2521.html">获取临时素材</a></li> 
        <li id="n-.E6.96.B0.E5.A2.9E.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../10/10ea5a44870f53d79449290dfd43d006.html">新增永久素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../12/3c12fac7c14cb4d0e0d4fe2fbc87b638.html">获取永久素材</a></li> 
        <li id="n-.E5.88.A0.E9.99.A4.E6.B0.B8.E4.B9.85.E7.B4.A0.E6.9D.90"><a href="../7/2212203f4e17253b9aef77dc788f5337.html">删除永久素材</a></li> 
        <li id="n-.E4.BF.AE.E6.94.B9.E6.B0.B8.E4.B9.85.E5.9B.BE.E6.96.87.E7.B4.A0.E6.9D.90"><a href="../10/c7bad9a463db20ff8ccefeedeef51f9e.html">修改永久图文素材</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.B4.A0.E6.9D.90.E6.80.BB.E6.95.B0"><a href="../5/a641fd7b5db7a6a946ebebe2ac166885.html">获取素材总数</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.B4.A0.E6.9D.90.E5.88.97.E8.A1.A8"><a href="../15/8386c11b7bc4cdd1499c572bfe2e95b3.html">获取素材列表</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /素材管理 --> 
     <!-- 用户管理 --> 
     <div class="portal" id="p-.E7.94.A8.E6.88.B7.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>用户管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.A8.E6.88.B7.E5.88.86.E7.BB.84.E7.AE.A1.E7.90.86"><a href="../8/d6d33cf60bce2a2e4fb10a21be9591b8.html">用户分组管理</a></li> 
        <li id="n-.E8.AE.BE.E7.BD.AE.E7.94.A8.E6.88.B7.E5.A4.87.E6.B3.A8.E5.90.8D"><a href="../16/528098c4a6a87b05120a7665c8db0460.html">设置用户备注名</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.9F.BA.E6.9C.AC.E4.BF.A1.E6.81.AF.28UnionID.E6.9C.BA.E5.88.B6.29"><a href="../1/8a5ce6257f1d3b2afb20f83e72b72ce9.html">获取用户基本信息(UnionID机制)</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.88.97.E8.A1.A8"><a href="../12/54773ff6da7b8bdc95b7d2667d84b1d4.html">获取用户列表</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E7.94.A8.E6.88.B7.E5.9C.B0.E7.90.86.E4.BD.8D.E7.BD.AE"><a href="../4/0bd25e04332eccf83bc2e71df9d3e860.html">获取用户地理位置</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /用户管理 --> 
     <!-- 帐号管理 --> 
     <div class="portal" id="p-.E5.B8.90.E5.8F.B7.E7.AE.A1.E7.90.86"> 
      <h5><span class="portal_arrow"></span>帐号管理</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.9F.E6.88.90.E5.B8.A6.E5.8F.82.E6.95.B0.E7.9A.84.E4.BA.8C.E7.BB.B4.E7.A0.81"><a href="../18/167e7d94df85d8389df6c94a7a8f78ba.html">生成带参数的二维码</a></li> 
        <li id="n-.E9.95.BF.E9.93.BE.E6.8E.A5.E8.BD.AC.E7.9F.AD.E9.93.BE.E6.8E.A5.E6.8E.A5.E5.8F.A3"><a href="../6/856aaeb492026466277ea39233dc23ee.html">长链接转短链接接口</a></li> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E8.AE.A4.E8.AF.81.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../10/2adfb2f10828e87aa1e5c3ef83b17906.html">微信认证事件推送</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /帐号管理 --> 
     <!-- 数据统计 --> 
     <div class="portal" id="p-.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"> 
      <h5><span class="portal_arrow"></span>数据统计</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.A8.E6.88.B7.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../15/88726a421bfc54654a3095821c3ca3bb.html">用户分析数据接口</a></li> 
        <li id="n-.E5.9B.BE.E6.96.87.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../9/d347c6ddb6f86ab11ec3b41c2729c8d9.html">图文分析数据接口</a></li> 
        <li id="n-.E6.B6.88.E6.81.AF.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../10/b29e8ca8bf1b0dce033ccb70273f90fa.html">消息分析数据接口</a></li> 
        <li id="n-.E6.8E.A5.E5.8F.A3.E5.88.86.E6.9E.90.E6.95.B0.E6.8D.AE.E6.8E.A5.E5.8F.A3"><a href="../17/252a976f20bd3062af3f03a45f30cff9.html">接口分析数据接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /数据统计 --> 
     <!-- 微信小店 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.B0.8F.E5.BA.97"> 
      <h5><span class="portal_arrow"></span>微信小店</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E5.B0.8F.E5.BA.97.E6.8E.A5.E5.8F.A3"><a href="../6/ae98ac4a7219405153cedc9dddccacca.html">微信小店接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信小店 --> 
     <!-- 微信卡券 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.8D.A1.E5.88.B8"> 
      <h5><span class="portal_arrow"></span>微信卡券</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E5.8D.A1.E5.88.B8.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../10/597cb57750f375a4b37e2536fd3331ea.html">微信卡券接口说明</a></li> 
        <li id="n-.E5.88.9B.E5.BB.BA.E5.8D.A1.E5.88.B8"><a href="../15/e33671f4ef511b77755142b37502928f.html">创建卡券</a></li> 
        <li id="n-.E6.8A.95.E6.94.BE.E5.8D.A1.E5.88.B8"><a href="../5/f942979ef2f0d313d4d36e3a26766a3d.html">投放卡券</a></li> 
        <li id="n-.E6.A0.B8.E9.94.80.E5.8D.A1.E5.88.B8"><a href="../15/bdfd0c3c6c3b0629e8a425936a973d8b.html">核销卡券</a></li> 
        <li id="n-.E7.AE.A1.E7.90.86.E5.8D.A1.E5.88.B8"><a href="../14/8dd77aeaee85f922db5f8aa6386d385e.html">管理卡券</a></li> 
        <li id="n-.E5.8D.A1.E5.88.B8.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../16/28b34ee91675a04cb24853768debded4.html">卡券事件推送</a></li> 
        <li id="n-.E6.9C.8B.E5.8F.8B.E7.9A.84.E5.88.B8.E4.B8.93.E5.8C.BA"><a href="../10/333958907c5aae0581e93a24f2df8562.html">朋友的券专区</a></li> 
        <li id="n-.E4.BC.9A.E5.91.98.E5.8D.A1.E4.B8.93.E5.8C.BA"><a href="../15/de148cc4b5190c80002eaf4f6f26c717.html">会员卡专区</a></li> 
        <li id="n-.E7.89.B9.E6.AE.8A.E7.A5.A8.E5.88.B8"><a href="../11/a42da6431597edff7caeaf5d33fac37b.html">特殊票券</a></li> 
        <li id="n-.E7.AC.AC.E4.B8.89.E6.96.B9.E4.BB.A3.E5.88.B6.E4.B8.93.E5.8C.BA"><a href="../13/a1b2bedbca3990108195f13bd7e27401.html">第三方代制专区</a></li> 
        <li id="n-.E5.8D.A1.E5.88.B8.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../7/981e7a73e2bca37a3d1c83f071be6947.html">卡券错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信卡券 --> 
     <!-- 微信门店 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E9.97.A8.E5.BA.97"> 
      <h5><span class="portal_arrow"></span>微信门店</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E9.97.A8.E5.BA.97.E6.8E.A5.E5.8F.A3"><a href="../11/081986f089826bf94393bef9bf287b8b.html">微信门店接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信门店 --> 
     <!-- 微信智能接口 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.99.BA.E8.83.BD.E6.8E.A5.E5.8F.A3"> 
      <h5><span class="portal_arrow"></span>微信智能接口</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.AF.AD.E4.B9.89.E7.90.86.E8.A7.A3.E6.8E.A5.E5.8F.A3"><a href="../10/65eb7a43f078cc609cf08dae6805f4a6.html">语义理解接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信智能接口 --> 
     <!-- 微信设备功能 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E8.AE.BE.E5.A4.87.E5.8A.9F.E8.83.BD"> 
      <h5><span class="portal_arrow"></span>微信设备功能</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E8.AE.BE.E5.A4.87.E5.8A.9F.E8.83.BD.E4.BB.8B.E7.BB.8D"><a href="../2/77400d13dc7fca83181bc9806d55b6ce.html">设备功能介绍</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信设备功能 --> 
     <!-- 微信多客服功能 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E5.A4.9A.E5.AE.A2.E6.9C.8D.E5.8A.9F.E8.83.BD"> 
      <h5><span class="portal_arrow"></span>微信多客服功能</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.B0.86.E6.B6.88.E6.81.AF.E8.BD.AC.E5.8F.91.E5.88.B0.E5.A4.9A.E5.AE.A2.E6.9C.8D"><a href="../11/f0e34a15cec66fefb28cf1c0388f68ab.html">将消息转发到多客服</a></li> 
        <li id="n-.E5.AE.A2.E6.9C.8D.E7.AE.A1.E7.90.86"><a href="../18/749901f4e123170fb8a4d447ae6040ba.html">客服管理</a></li> 
        <li id="n-.E5.A4.9A.E5.AE.A2.E6.9C.8D.E4.BC.9A.E8.AF.9D.E6.8E.A7.E5.88.B6"><a href="../4/4b256cfb246b22ad020e07cf8a61a738.html">多客服会话控制</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E5.AE.A2.E6.9C.8D.E8.81.8A.E5.A4.A9.E8.AE.B0.E5.BD.95"><a href="../3/178d2982bd590adf33fc03cf6cf45b33.html">获取客服聊天记录</a></li> 
        <li id="n-PC.E5.AE.A2.E6.88.B7.E7.AB.AF.E8.87.AA.E5.AE.9A.E4.B9.89.E6.8F.92.E4.BB.B6.E6.8E.A5.E5.8F.A3"><a href="../8/3634566e351f497f508c7b9d04636724.html">PC客户端自定义插件接口</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信多客服功能 --> 
     <!-- 微信摇一摇周边 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9"> 
      <h5><span class="portal_arrow"></span>微信摇一摇周边</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E7.94.B3.E8.AF.B7.E5.BC.80.E9.80.9A.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9"><a href="../19/9fe9fdbb50fee9f9660438c551142ccf.html">申请开通摇一摇周边</a></li> 
        <li id="n-.E8.AE.BE.E5.A4.87.E7.AE.A1.E7.90.86"><a href="../15/095caa2f4a829f0299db617eaf6ad1cf.html">设备管理</a></li> 
        <li id="n-.E9.A1.B5.E9.9D.A2.E7.AE.A1.E7.90.86"><a href="../15/7a21268ed234b4e648d86e3b91118907.html">页面管理</a></li> 
        <li id="n-.E7.B4.A0.E6.9D.90.E7.AE.A1.E7.90.86"><a href="../12/3b10084ee944a702fd06e54a0f10b1d8.html">素材管理</a></li> 
        <li id="n-.E7.AE.A1.E7.90.86.E8.AE.BE.E5.A4.87.E4.B8.8E.E9.A1.B5.E9.9D.A2.E7.9A.84.E5.85.B3.E8.81.94.E5.85.B3.E7.B3.BB"><a href="../6/0eb3f80f152d2edb95287141e7a6ab5e.html">管理设备与页面的关联关系</a></li> 
        <li id="n-.E8.8E.B7.E5.8F.96.E8.AE.BE.E5.A4.87.E5.8F.8A.E7.94.A8.E6.88.B7.E4.BF.A1.E6.81.AF"><a href="../12/f18e741c4cab6652afe3878774672de4.html">获取设备及用户信息</a></li> 
        <li id="n-.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"><a href="../3/15da0147e3722fd689f363497af0c707.html">数据统计</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E5.85.B3.E6.B3.A8JSAPI"><a href="../4/94e3b1dc0416633a2d7f1cfaa71240c8.html">摇一摇关注JSAPI</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E4.BA.8B.E4.BB.B6.E9.80.9A.E7.9F.A5"><a href="../3/c71248e1b3efb158f258a48b72e67683.html">摇一摇事件通知</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E7.BA.A2.E5.8C.85"><a href="../7/0ddd50ed2421b99fedd071281c074aab.html">摇一摇红包</a></li> 
        <li id="n-Html-5.E9.A1.B5.E9.9D.A2.E8.8E.B7.E5.8F.96.E8.AE.BE.E5.A4.87.E4.BF.A1.E6.81.AF"><a href="../11/c156a3e968b0c1e78157e15275dcc54b.html">Html 5页面获取设备信息</a></li> 
        <li id="n-.E6.91.87.E4.B8.80.E6.91.87.E5.91.A8.E8.BE.B9.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../1/8299371e6e11392757b23a6d1e592331.html">摇一摇周边错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信摇一摇周边 --> 
     <!-- 微信连Wi-Fi --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi"> 
      <h5><span class="portal_arrow"></span>微信连Wi-Fi</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi.E5.BC.80.E5.8F.91.E8.80.85.E6.8C.87.E5.BC.95"><a href="../9/fd2d692e28b938a8d618f57cf9c79fb1.html">微信连Wi-Fi开发者指引</a></li> 
        <li id="n-Wi-Fi.E7.A1.AC.E4.BB.B6.E9.89.B4.E6.9D.83.E5.8D.8F.E8.AE.AE.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../10/0ef643c7147fdf689e0a780d8c08ab96.html">Wi-Fi硬件鉴权协议接口说明</a></li> 
        <li id="n-Wi-Fi.E8.BD.AF.E4.BB.B6.E6.9C.8D.E5.8A.A1.E7.AE.A1.E7.90.86.E6.8E.A5.E5.8F.A3.E8.AF.B4.E6.98.8E"><a href="../14/70e147b2ace3247f88f1c2aaaa57568e.html">Wi-Fi软件服务管理接口说明</a></li> 
        <li id="n-.E5.BC.80.E9.80.9A.E5.BE.AE.E4.BF.A1.E8.BF.9EWi-Fi.E6.8F.92.E4.BB.B6"><a href="../11/a6a3731b23ed4203f5d08030cd5bf4c3.html">开通微信连Wi-Fi插件</a></li> 
        <li id="n-Wi-Fi.E9.97.A8.E5.BA.97.E7.AE.A1.E7.90.86"><a href="../9/0afbb08a0f06e87dd3669a2c1e19edd5.html">Wi-Fi门店管理</a></li> 
        <li id="n-Wi-Fi.E8.AE.BE.E5.A4.87.E7.AE.A1.E7.90.86"><a href="../17/438e819a53e9426b202c3bc0afbad749.html">Wi-Fi设备管理</a></li> 
        <li id="n-.E9.85.8D.E7.BD.AE.E8.BF.9E.E7.BD.91.E6.96.B9.E5.BC.8F"><a href="../17/22648869929525f829a3de1bfc73eb4d.html">配置连网方式</a></li> 
        <li id="n-.E5.95.86.E5.AE.B6.E4.B8.BB.E9.A1.B5.E7.AE.A1.E7.90.86"><a href="../14/4e14adf8639aeb67d42df05cb792da9e.html">商家主页管理</a></li> 
        <li id="n-Wi-Fi.E6.95.B0.E6.8D.AE.E7.BB.9F.E8.AE.A1"><a href="../11/f5f481aeeb62b9b0848315f78123b4d7.html">Wi-Fi数据统计</a></li> 
        <li id="n-.E8.BF.9E.E7.BD.91.E5.90.8E.E4.B8.8B.E5.8F.91.E6.B6.88.E6.81.AF"><a href="../19/bac84e64da24f928c3e536c742d4e0b7.html">连网后下发消息</a></li> 
        <li id="n-Wi-Fi.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../9/b1211ca9404ec481f94e88d0dd344e85.html">Wi-Fi错误码</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信连Wi-Fi --> 
     <!-- 微信扫一扫 --> 
     <div class="portal" id="p-.E5.BE.AE.E4.BF.A1.E6.89.AB.E4.B8.80.E6.89.AB"> 
      <h5><span class="portal_arrow"></span>微信扫一扫</h5> 
      <div class="body"> 
       <ul> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E6.8E.A5.E5.85.A5.E6.8C.87.E5.8D.97"><a href="../19/e833eb10470cc25cad4719677c46ecdb.html">扫一扫接入指南</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E5.88.9B.E5.BB.BA"><a href="../6/c61604ff6890d386d6227945ad4a68d2.html">商品创建</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E5.8F.91.E5.B8.83"><a href="../15/1007691d0f1c10a0588c6517f12ed70f.html">商品发布</a></li> 
        <li id="n-.E5.95.86.E5.93.81.E7.AE.A1.E7.90.86"><a href="../15/7fa787701295b884410b5163e13313af.html">商品管理</a></li> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81"><a href="../15/f4109a5e44b4bfbc7eb1337eb739f3e3.html">扫一扫事件推送</a></li> 
        <li id="n-.E9.94.99.E8.AF.AF.E7.A0.81"><a href="../7/91dcb5ffa7d087a23299316c3c396e93.html">错误码</a></li> 
        <li id="n-.E5.9C.A8.E7.BA.BF.E5.B8.AE.E5.8A.A9.E5.B7.A5.E5.85.B7"><a href="../11/9f75990a5e9f6c09c846fd918921e0d7.html">在线帮助工具</a></li> 
        <li id="n-.E6.89.AB.E4.B8.80.E6.89.AB.E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><a href="../15/b11cde45d1dcb23a94f493dd1e1320cb.html">扫一扫常见问题</a></li> 
       </ul> 
      </div> 
     </div> 
     <!-- /微信扫一扫 --> 
     <!-- SEARCH --> 
     <!-- /SEARCH --> 
     <!-- TOOLBOX --> 
     <!-- /TOOLBOX --> 
     <!-- LANGUAGES --> 
     <!-- /LANGUAGES --> 
    </div> 
    <!-- /panel --> 
    <!-- content --> 
    <div id="content"> 
     <!-- header --> 
     <div id="mw-head" class="noprint" style="visibility:hidden"> 
      <!-- 0 --> 
      <div id="p-personal" class=""> 
       <h5>个人工具</h5> 
       <ul> 
        <li id="pt-anonuserpage"><a href="../0/f33145bff5a2445cabbd49fc12e8f2e0.html" title="您编辑本站所用IP的对应用户页 [.]" accesskey="." class="new">10.9.161.40</a></li> 
        <li id="pt-anontalk"><a href="../12/4aa3e991f9670e48be3d9c6d01c4c568.html" title="对于来自此IP地址的编辑的对话 [n]" accesskey="n" class="new">该IP的讨论页</a></li> 
        <li id="pt-anonlogin"><a href="../5/237187e186aedfaf1aafc37cbace565d.html" title="我们鼓励您登录，但这并不是必须的 [o]" accesskey="o">登录</a></li> 
       </ul> 
      </div> 
      <!-- /0 --> 
      <div id="left-navigation"> 
       <!-- 0 --> 
       <div id="p-namespaces" class="vectorTabs"> 
        <h5>名字空间</h5> 
        <ul> 
         <li id="ca-nstab-main" class="selected"><span><a href="../10/0ef643c7147fdf689e0a780d8c08ab96.html" title="查看页面内容 [c]" accesskey="c">页面</a></span></li> 
         <li id="ca-talk" class="new"><span><a href="#" title="关于页面正文的讨论 [t]" accesskey="t">讨论</a></span></li> 
        </ul> 
       </div> 
       <!-- /0 --> 
       <!-- 1 --> 
       <div id="p-variants" class="vectorMenu emptyPortlet"> 
        <h5><span>变换</span><a href="#"></a></h5> 
        <div class="menu"> 
         <ul> 
         </ul> 
        </div> 
       </div> 
       <!-- /1 --> 
      </div> 
      <div id="right-navigation"> 
       <!-- 0 --> 
       <div id="p-views" class="vectorTabs"> 
        <h5>查看</h5> 
        <ul> 
         <li id="ca-view" class="selected"><span><a href="../10/0ef643c7147fdf689e0a780d8c08ab96.html">阅读</a></span></li> 
         <li id="ca-viewsource"><span><a href="#" title="此页面已被保护，你可以查看其源代码。 [e]" accesskey="e">查看源代码</a></span></li> 
         <li id="ca-history" class="collapsible "><span><a href="#" title="此页面的早前修订版本 [h]" accesskey="h">查看历史</a></span></li> 
        </ul> 
       </div> 
       <!-- /0 --> 
       <!-- 1 --> 
       <div id="p-cactions" class="vectorMenu emptyPortlet"> 
        <h5><span>动作</span><a href="#"></a></h5> 
        <div class="menu"> 
         <ul> 
         </ul> 
        </div> 
       </div> 
       <!-- /1 --> 
       <!-- 2 --> 
       <div id="p-search"> 
        <h5><label for="searchInput">搜索</label></h5> 
        <form action="/wiki/index.php" id="searchform"> 
         <input type="hidden" name="title" value="特殊:搜索"> 
         <input id="searchInput" name="search" type="text" title="搜索该网站 [f]" accesskey="f" value=""> 
         <input type="submit" name="go" class="searchButton" id="searchGoButton" value="进入" title="如果相同的标题存在的话便直接前往该页面"> 
         <input type="submit" name="fulltext" class="searchButton" id="mw-searchButton" value="搜索" title="搜索该文字的页面"> 
        </form> 
       </div> 
       <!-- /2 --> 
      </div> 
     </div> 
     <!-- /header --> 
     <a id="top"></a> 
     <div id="mw-js-message" style="display:none;"></div> 
     <!-- firstHeading --> 
     <div class="content_hd"> 
      <h2 id="firstHeading" class="">Wi-Fi硬件鉴权协议接口说明</h2> 
      <div class="info"> 
      </div> 
     </div> 
     <!-- /firstHeading --> 
     <!-- bodyContent --> 
     <div id="bodyContent" class="bodyContent"> 
      <!-- tagline --> 
      <div id="siteSub">
       出自微信公众平台开发者文档
      </div> 
      <!-- /tagline --> 
      <!-- subtitle --> 
      <div id="contentSub"></div> 
      <!-- /subtitle --> 
      <!-- jumpto --> 
      <div id="jump-to-nav">
        跳转到： 
       <a href="#mw-head">导航</a>, 
       <a href="#p-search">搜索</a> 
      </div> 
      <!-- /jumpto --> 
      <!-- bodytext --> 
      <table id="toc" class="toc">
       <tbody>
        <tr>
         <td>
          <div id="toctitle">
           <h2>目录</h2>
          </div> 
          <ul> 
           <li class="toclevel-1 tocsection-1"><a href="#.E6.A6.82.E8.BF.B0"><span class="tocnumber">1</span> <span class="toctext">概述</span></a></li> 
           <li class="toclevel-1 tocsection-2"><a href="#.E4.B8.9A.E5.8A.A1.E9.80.BB.E8.BE.91"><span class="tocnumber">2</span> <span class="toctext">业务逻辑</span></a> 
            <ul> 
             <li class="toclevel-2 tocsection-3"><a href="#.E7.A7.BB.E5.8A.A8.E7.AB.AF.E8.BF.9EWi-Fi"><span class="tocnumber">2.1</span> <span class="toctext">移动端连Wi-Fi</span></a></li> 
             <li class="toclevel-2 tocsection-4"><a href="#PC.E8.BF.9EWi-Fi"><span class="tocnumber">2.2</span> <span class="toctext">PC连Wi-Fi</span></a></li> 
            </ul> </li> 
           <li class="toclevel-1 tocsection-5"><a href="#.E7.A7.BB.E5.8A.A8.E7.AB.AF.E5.AE.9E.E7.8E.B0.E6.B5.81.E7.A8.8B"><span class="tocnumber">3</span> <span class="toctext">移动端实现流程</span></a> 
            <ul> 
             <li class="toclevel-2 tocsection-6"><a href="#.E7.AC.AC.E4.B8.80.E6.AD.A5.EF.BC.9A.E8.8E.B7.E5.8F.96.E9.97.A8.E5.BA.97Wi-Fi.E4.BF.A1.E6.81.AF"><span class="tocnumber">3.1</span> <span class="toctext">第一步：获取门店Wi-Fi信息</span></a> 
              <ul> 
               <li class="toclevel-3 tocsection-7"><a href="#.E9.A1.B5.E9.9D.A2.E6.93.8D.E4.BD.9C.E8.8E.B7.E5.BE.97"><span class="tocnumber">3.1.1</span> <span class="toctext">页面操作获得</span></a></li> 
               <li class="toclevel-3 tocsection-8"><a href="#.E9.80.9A.E8.BF.87.E6.8E.A5.E5.8F.A3.E8.8E.B7.E5.BE.97"><span class="tocnumber">3.1.2</span> <span class="toctext">通过接口获得</span></a></li> 
              </ul> </li> 
             <li class="toclevel-2 tocsection-9"><a href="#.E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E6.94.B9.E9.80.A0.E7.A7.BB.E5.8A.A8.E7.AB.AFportal.E9.A1.B5.E9.9D.A2"><span class="tocnumber">3.2</span> <span class="toctext">第二步：改造移动端portal页面</span></a></li> 
             <li class="toclevel-2 tocsection-10"><a href="#.E7.AC.AC.E4.B8.89.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81.E4.B8.B4.E6.97.B6.E6.94.BE.E8.A1.8C.E4.B8.8A.E7.BD.91.E8.AF.B7.E6.B1.82"><span class="tocnumber">3.3</span> <span class="toctext">第三步：支持临时放行上网请求</span></a></li> 
             <li class="toclevel-2 tocsection-11"><a href="#.E7.AC.AC.E5.9B.9B.E6.AD.A5.EF.BC.9A.E6.8E.A5.E5.8F.97.E5.BE.AE.E4.BF.A1.E8.BA.AB.E4.BB.BD.E8.AE.A4.E8.AF.81.E6.94.BE.E8.A1.8C"><span class="tocnumber">3.4</span> <span class="toctext">第四步：接受微信身份认证放行</span></a></li> 
             <li class="toclevel-2 tocsection-12"><a href="#.E7.AC.AC.E4.BA.94.E6.AD.A5.EF.BC.9A.E5.AE.9E.E7.8E.B0.E6.89.AB.E4.BA.8C.E7.BB.B4.E7.A0.81.E8.BF.9E.E7.BD.91"><span class="tocnumber">3.5</span> <span class="toctext">第五步：实现扫二维码连网</span></a></li> 
             <li class="toclevel-2 tocsection-13"><a href="#.E7.A7.BB.E5.8A.A8.E7.AB.AFportal.E9.A1.B5.E7.A4.BA.E4.BE.8BDemo"><span class="tocnumber">3.6</span> <span class="toctext">移动端portal页示例Demo</span></a></li> 
             <li class="toclevel-2 tocsection-14"><a href="#.E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><span class="tocnumber">3.7</span> <span class="toctext">常见问题</span></a></li> 
            </ul> </li> 
           <li class="toclevel-1 tocsection-15"><a href="#PC.E7.AB.AF.E5.AE.9E.E7.8E.B0.E6.B5.81.E7.A8.8B"><span class="tocnumber">4</span> <span class="toctext">PC端实现流程</span></a> 
            <ul> 
             <li class="toclevel-2 tocsection-16"><a href="#.E7.AC.AC.E4.B8.80.E6.AD.A5.EF.BC.9A.E8.8E.B7.E5.8F.96.E9.97.A8.E5.BA.97Wi-Fi.E4.BF.A1.E6.81.AF_2"><span class="tocnumber">4.1</span> <span class="toctext">第一步：获取门店Wi-Fi信息</span></a></li> 
             <li class="toclevel-2 tocsection-17"><a href="#.E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E6.94.B9.E9.80.A0PC.E7.AB.AFportal.E9.A1.B5"><span class="tocnumber">4.2</span> <span class="toctext">第二步：改造PC端portal页</span></a></li> 
             <li class="toclevel-2 tocsection-18"><a href="#.E7.AC.AC.E4.B8.89.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81PC.E7.AB.AF.E7.99.BD.E5.90.8D.E5.8D.95.E6.94.BE.E8.A1.8C"><span class="tocnumber">4.3</span> <span class="toctext">第三步：支持PC端白名单放行</span></a></li> 
             <li class="toclevel-2 tocsection-19"><a href="#.E7.AC.AC.E5.9B.9B.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81.E7.A7.BB.E5.8A.A8.E7.AB.AF.E4.B8.B4.E6.97.B6.E6.94.BE.E8.A1.8C.E4.B8.8A.E7.BD.91.E8.AF.B7.E6.B1.82"><span class="tocnumber">4.4</span> <span class="toctext">第四步：支持移动端临时放行上网请求</span></a></li> 
             <li class="toclevel-2 tocsection-20"><a href="#.E7.AC.AC.E4.BA.94.E6.AD.A5.EF.BC.9A.E6.8E.A5.E5.8F.97.E5.BE.AE.E4.BF.A1.E8.BA.AB.E4.BB.BD.E8.AE.A4.E8.AF.81.E6.94.BE.E8.A1.8C"><span class="tocnumber">4.5</span> <span class="toctext">第五步：接受微信身份认证放行</span></a></li> 
             <li class="toclevel-2 tocsection-21"><a href="#PC.E7.AB.AFportal.E9.A1.B5.E7.A4.BA.E4.BE.8BDemo"><span class="tocnumber">4.6</span> <span class="toctext">PC端portal页示例Demo</span></a></li> 
            </ul> </li> 
          </ul> </td>
        </tr>
       </tbody>
      </table> 
      <h1> <span class="mw-headline" id=".E6.A6.82.E8.BF.B0"><b>概述</b></span></h1> 
      <p>硬件鉴权协议主要用于Portal型设备的鉴权方式改造，使设备可以通过识别微信身份给顾客放行，让顾客的手机和PC快速便捷连上Wi-Fi。 </p> 
      <h1> <span class="mw-headline" id=".E4.B8.9A.E5.8A.A1.E9.80.BB.E8.BE.91"><b>业务逻辑</b></span></h1> 
      <h3> <span class="mw-headline" id=".E7.A7.BB.E5.8A.A8.E7.AB.AF.E8.BF.9EWi-Fi"><b>移动端连Wi-Fi</b></span></h3> 
      <p><b>用户连网流程</b> </p>
      <p>顾客在手机上点选ssid后唤起portal页，点击页面上“微信连Wi-Fi”按钮进入连接前页，展示公众号logo和名称，点击“立即连网”按钮后开始连WiFi，连接成功后跳转到成功连接页，默认勾选关注商家公众号。 </p>
      <p><a href="#" class="image"><img alt="WiFi用户连网过程.jpg" src="../static/assets/5dcac6de956994f4285f3b13b3b16928.jpg" width="700" height="321"></a> </p>
      <p><br> <b>模块时序图</b> </p>
      <p>若无法看清图中文字，可先通过“图片另存为”将图片保存到本地，再放大查看。 </p>
      <p><a href="#" class="image" title="965px*756px"><img alt="965px*756px" src="../static/assets/f18a017efee3c829ad128cbbd361f2b0.png" width="1061" height="832"></a> </p> 
      <h3> <span class="mw-headline" id="PC.E8.BF.9EWi-Fi"><b>PC连Wi-Fi</b></span></h3> 
      <p><b>用户连网流程</b> </p>
      <p>顾客在PC上选择ssid后，在浏览器打开portal页，页面上展示连Wi-Fi二维码。用手机微信扫描该二维码，点击手机页面上的“确认”按钮，PC连上Wi-Fi，同时浏览器的portal页自动跳转到商家配置的网页。 </p>
      <p><a href="#" class="image"><img alt="PC连网.gif" src="../static/assets/2d26af57ee07a00c9c5ab4b154781491.gif" width="600" height="400"></a> </p>
      <p><br> <b>模块时序图</b> </p>
      <p>若无法看清图中文字，可先通过“图片另存为”将图片保存到本地，再放大查看。 </p>
      <p><a href="#" class="image"><img alt="PC连网时序图.png" src="../static/assets/70ed0c7d7eb114ccb00d4e7be4c27d9a.png" width="800" height="531"></a> </p> 
      <h1> <span class="mw-headline" id=".E7.A7.BB.E5.8A.A8.E7.AB.AF.E5.AE.9E.E7.8E.B0.E6.B5.81.E7.A8.8B"><b>移动端实现流程</b></span></h1> 
      <p>请按照以下步骤操作，即可完成设备改造，让移动端设备使用微信连Wi-Fi。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.B8.80.E6.AD.A5.EF.BC.9A.E8.8E.B7.E5.8F.96.E9.97.A8.E5.BA.97Wi-Fi.E4.BF.A1.E6.81.AF"><b>第一步：获取门店Wi-Fi信息</b></span></h3> 
      <p>改造portal型设备的第一步，是获得门店Wi-Fi信息，包括：appId，shop_id，ssid，secretkey。有两种获取门店Wi-Fi信息的方法，一种是在微信公众平台微信连Wi-Fi插件中通过页面操作获得；一种是通过调用接口获得。具体方法见下： </p> 
      <h4> <span class="mw-headline" id=".E9.A1.B5.E9.9D.A2.E6.93.8D.E4.BD.9C.E8.8E.B7.E5.BE.97"><b>页面操作获得</b></span></h4> 
      <p>在<a href="https://mp.weixin.qq.com/" class="external text" rel="nofollow">微信公众平台</a>开通微信连Wi-Fi插件，在【设备管理】-&gt;【添加设备】里，添加“新增微信方式连网+连网后近场服务”-&gt;”Portal型设备”；添加成功后即可获得门店Wi-Fi参数信息。 </p>
      <p>已添加设备也可在【设备详情】-&gt;【查看设备改造信息】中，获得门店Wi-Fi参数信息。 </p> 
      <h4> <span class="mw-headline" id=".E9.80.9A.E8.BF.87.E6.8E.A5.E5.8F.A3.E8.8E.B7.E5.BE.97"><b>通过接口获得</b></span></h4> 
      <p>secretkey为加密字符串参数，是硬件改造流程中的重要参数。 </p>
      <p>调用下述接口可以获得secretkey。为防止secretkey泄露，可通过此接口重置刷新，重置后之前生成的secretkey将会失效。 </p>
      <p>注：如果门店下已有非portal型设备时，无法调用此接口。同一个门店已有portal型设备后，再次调用此接口时传入ssid必须和已有设备的ssid保持一致。 </p>
      <p><b>接口调用说明</b> </p> 
      <pre>协议：https
http请求方式: POST
请求URL：<a href="https://api.weixin.qq.com/bizwifi/apportal/register?access_token=ACCESS_TOKEN" class="external free" rel="nofollow">https://api.weixin.qq.com/bizwifi/apportal/register?access_token=ACCESS_TOKEN</a>
POST数据格式：JSON
</pre> 
      <p><b>请求参数说明</b> </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">参数 </th> 
         <th style="width:80px">是否必须 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> access_token </td> 
         <td> 是 </td> 
         <td> 调用接口凭证 </td>
        </tr> 
        <tr> 
         <td> POST数据 </td> 
         <td> 是 </td> 
         <td> JSON数据 </td>
        </tr> 
       </tbody>
      </table> 
      <p><b>POST数据</b> </p>
      <p>数据示例： </p> 
      <pre>{
   "shop_id": 429620,
   "ssid": "WX123",
   "reset": false
}
</pre> 
      <p>字段说明： </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">字段 </th> 
         <th style="width:80px">是否必填 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> shop_id </td> 
         <td> 是 </td> 
         <td> 门店ID，调用<a href="../9/0afbb08a0f06e87dd3669a2c1e19edd5.html" class="external text" rel="nofollow">“获取WiFi门店列表”</a>接口获得 </td>
        </tr> 
        <tr> 
         <td> ssid </td> 
         <td> 是 </td> 
         <td> 无线网络设备的ssid，限30个字符以内。ssid支持中文，但可能因设备兼容性问题导致显示乱码，或无法连接等问题，相关风险自行承担！ </td>
        </tr> 
        <tr> 
         <td> reset </td> 
         <td> 否 </td> 
         <td> 重置secretkey，false-不重置，true-重置，默认为false </td>
        </tr> 
       </tbody>
      </table> 
      <p><b>返回数据说明</b> 正确返回JSON数据示例： </p> 
      <pre>{
   "errcode": 0,
   "data": {
     "secretkey": "1af08ec5cdb70a4d7365bcd64d3120f6"
   }
}
</pre> 
      <p>字段说明： </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">字段 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> secretkey </td> 
         <td> 改造portal页面所需参数，该参数用于触发呼起微信的JSAPI接口的sign参数值的计算 </td>
        </tr> 
       </tbody>
      </table> 
      <p><br> </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E6.94.B9.E9.80.A0.E7.A7.BB.E5.8A.A8.E7.AB.AFportal.E9.A1.B5.E9.9D.A2"><b>第二步：改造移动端portal页面</b></span></h3> 
      <p>若连网设备是移动设备，在portal页中引用下述微信JSAPI，让原有Wi-Fi portal页具备呼起微信的能力： </p> 
      <pre>&lt;script type="text/javascript"    
src="<a href="https://wifi.weixin.qq.com/resources/js/wechatticket/wechatutil.js" class="external free" rel="nofollow">https://wifi.weixin.qq.com/resources/js/wechatticket/wechatutil.js</a>" &gt;&lt;/script&gt;
</pre> 
      <p>调用JSAPI触发呼起微信客户端： </p> 
      <pre>Wechat_GotoRedirect(
appId,      
extend,     
timestamp, 
sign,       
shop_id,   
authUrl,   
mac,      
ssid ); 
</pre> 
      <p>具体示例： </p> 
      <pre>Wechat_GotoRedirect(
'wx23fb4aaf04b8491e',  
'demoNew',            
'1441768153341',          
'a355c78bad9be9235d2105d28f8e010c',   
'6747662',  
'<a href="http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200'" class="external free" rel="nofollow">http://wifi.weixin.qq.com/assistant/wifigw/auth.xhtml?httpCode=200'</a>,       
'aa:aa:aa:aa:aa:aa',     
'2099');
</pre> 
      <p><b>参数说明</b> </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">参数 </th> 
         <th style="width:80px">是否必须 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> appId </td> 
         <td> 是 </td> 
         <td> 商家微信公众平台账号 </td>
        </tr> 
        <tr> 
         <td> extend </td> 
         <td> 是 </td> 
         <td> <b>extend里面可以放开发者需要的相关参数集合</b>，最终将透传给运营商认证URL。extend参数只支持英文和数字，且长度不得超过300个字符。 </td>
        </tr> 
        <tr> 
         <td> timestamp </td> 
         <td> 是 </td> 
         <td> 时间戳使用毫秒 </td>
        </tr> 
        <tr> 
         <td> sign </td> 
         <td> 是 </td> 
         <td> 请求参数签名，具体计算方法见下方说明 </td>
        </tr> 
        <tr> 
         <td> shop_id </td> 
         <td> 是 </td> 
         <td> AP设备所在门店的ID（微信公众平台门店） </td>
        </tr> 
        <tr> 
         <td> authUrl </td> 
         <td> 是 </td> 
         <td> 认证服务端URL，微信客户端将把用户微信身份信息向此URL提交并获得认证放行 </td>
        </tr> 
        <tr> 
         <td> mac </td> 
         <td> 安卓设备必需 </td> 
         <td> 用户手机mac地址，格式冒号分隔，字符长度17个，并且字母小写，例如：00:1f:7a:ad:5c:a8 </td>
        </tr> 
        <tr> 
         <td> ssid </td> 
         <td> 否 </td> 
         <td> AP设备的信号名称 </td>
        </tr> 
       </tbody>
      </table> 
      <p>签名的计算方法： </p> 
      <pre>sign = MD5(appId + extend + timestamp + shop_id + authUrl + mac + ssid + secretkey);
<b>注意这里timestamp为毫秒单位的当前时间戳</b>
</pre> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.B8.89.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81.E4.B8.B4.E6.97.B6.E6.94.BE.E8.A1.8C.E4.B8.8A.E7.BD.91.E8.AF.B7.E6.B1.82"><b>第三步：支持临时放行上网请求</b></span></h3> 
      <p>请确保AP/AC在portal页打开后能够临时放行用户的上网请求。只有临时放行成功，才可以调用上述JSAPI呼起微信，换取用户身份信息，保证后续认证请求顺利完成，从而成功连网。 </p>
      <p>注意：IOS呼起微信时如果网络不通Wi-Fi会被切走，导致连网失败，因此请务必确保AC/AP支持临时放行上网请求。 </p>
      <p>部分安卓设备的web浏览器无法自动呼起微信客户端的问题，请参考常见问题中的解决方案。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E5.9B.9B.E6.AD.A5.EF.BC.9A.E6.8E.A5.E5.8F.97.E5.BE.AE.E4.BF.A1.E8.BA.AB.E4.BB.BD.E8.AE.A4.E8.AF.81.E6.94.BE.E8.A1.8C"><b>第四步：接受微信身份认证放行</b></span></h3> 
      <p>微信客户端被呼起后，将自动向authUrl（JSAPI的传入参数）发起请求，提交认证所需的用户微信身份信息参数，包括extend、openId、tid。 </p>
      <p>微信客户端向authUrl发送请求示例： </p> 
      <pre><a href="http://www.foo.com/portal/auth.html?extend=xxx&amp;openId=xxx&amp;tid=xxx" class="external free" rel="nofollow">http://www.foo.com/portal/auth.html?extend=xxx&amp;openId=xxx&amp;tid=xxx</a>
</pre> 
      <p><b>参数说明</b> </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">参数 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> extend </td> 
         <td> 为上文中调用呼起微信JSAPI时传递的extend参数，这里原样回传给商家主页 </td>
        </tr> 
        <tr> 
         <td> openId </td> 
         <td> 用户的微信openId </td>
        </tr> 
        <tr> 
         <td> tid </td> 
         <td> 为加密后的用户手机号码（仅作网监部门备案使用） </td>
        </tr> 
       </tbody>
      </table> 
      <p>authUrl所对应的后台认证服务器必须能识别这些参数信息，并向微信客户端返回AC认证结果，微信客户端将根据http返回码，提示用户连网成功与否。 </p>
      <p>若http返回码为200，则认为服务认证成功，微信客户端跳转到成功连接页，并默认勾选关注公众号，用户点击“完成”按钮后，将跳转到商家主页；若认证服务器需要转移认证请求，请返回302和下一跳地址，微信客户端将向下一跳地址再发起一次请求，302跳转仅支持一次；对于非200和302，或者超过次数的302返回码，视为认证失败，此次连网失败，微信客户端跳转到连接失败页。 </p>
      <p>注意：微信客户端一次请求的等待时间为10s，请确保后台认证服务器在微信客户端向authUrl发送请求10s之内返回AC认证结果，即http返回码。超过10s未返回认证结果将视为认证失败。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.BA.94.E6.AD.A5.EF.BC.9A.E5.AE.9E.E7.8E.B0.E6.89.AB.E4.BA.8C.E7.BB.B4.E7.A0.81.E8.BF.9E.E7.BD.91"><b>第五步：实现扫二维码连网</b></span></h3> 
      <p>在完成第一至四步的前提下，进行下述配置，可实现portal设备扫二维码连Wi-Fi。具体操作如下（由于IOS设备无法通过微信直接切换Wi-Fi信号，因此本流程主要针对Android设备）： </p>
      <p><b>1. 改造portal server跳转内容</b> </p>
      <p>当一个未认证的手机用户试图联网时，AC会将用户的http请求转跳到Portal Server上的Portal页面，这里AC需要进一步识别，如果这个http请求是来自于微信客户端，则在转跳URL上带上authUrl和extend两个约定参数即可。 </p> 
      <pre><a href="http://www.foo.com/portal/portal.html?authUrl=http%3A%2F%2Fwww.foo.com%2Fportal%2Fauth.html&amp;extend=xxx" class="external free" rel="nofollow">http://www.foo.com/portal/portal.html?authUrl=http%3A%2F%2Fwww.foo.com%2Fportal%2Fauth.html&amp;extend=xxx</a>
</pre> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">参数 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> authUrl </td> 
         <td> 即第二步portal页中填写的authUrl，是认证服务端URL，微信客户端将把用户微信身份信息向此URL提交并获得认证放行 </td>
        </tr> 
        <tr> 
         <td> extend </td> 
         <td> 为上文中调用呼起微信JSAPI时传递的extend参数，这里原样回传给商家主页 </td>
        </tr> 
       </tbody>
      </table> 
      <p><b>2. 如何识别http请求是否来自微信客户端</b> </p>
      <p>在http数据包的header结构中解析“User-Agent”即可，判断是否包含关键字“micromessenger”，示例代码如下： </p> 
      <pre>...
String userAgent = request.getHeader("User-Agent");
if(userAgent.matches(".*micromessenger.*")){
	  response.sendRedirect("<a href="http://www.foo.com/portal/portal.html?authUrl=http%3A%2F%2Fwww.foo.com%2Fportal%2Fauth.html&amp;extend=xxx" class="external free" rel="nofollow">http://www.foo.com/portal/portal.html?authUrl=http%3A%2F%2Fwww.foo.com%2Fportal%2Fauth.html&amp;extend=xxx</a> ");			
}
...
</pre> 
      <p>微信客户端将解析Portal Server转跳地址中的authUrl和extend参数，继续完成连接流程。 </p>
      <p><b>3. 下载物料二维码</b> </p>
      <p>完成portal server改造后，调用“<a href="../17/22648869929525f829a3de1bfc73eb4d.html" class="external text" rel="nofollow">获取物料二维码</a>”接口，下载该门店二维码，张贴于店内，顾客即可扫码连Wi-Fi。 </p> 
      <h3> <span class="mw-headline" id=".E7.A7.BB.E5.8A.A8.E7.AB.AFportal.E9.A1.B5.E7.A4.BA.E4.BE.8BDemo"><b>移动端portal页示例Demo</b></span></h3> 
      <p>请参考示例Demo，进行移动端Portal页面改造（JS代码直接在页面中） </p>
      <p>请用<b>手机浏览器</b>打开以下链接（可手动输入，也可扫码获得链接地址）： </p>
      <p><a href="https://wifi.weixin.qq.com/operator/demoNew.xhtml" class="external free" rel="nofollow">https://wifi.weixin.qq.com/operator/demoNew.xhtml</a> </p>
      <p><a href="#" class="image"><img alt="WiFiDemo.png" src="../static/assets/5f061cf24b3795b26e956af812456e62.png" width="200" height="200"></a> </p>
      <p>如果用微信扫码，请点击有右上角按钮，选择“在浏览器中打开”页面，不要直接在微信浏览器中体验。 </p> 
      <h3> <span class="mw-headline" id=".E5.B8.B8.E8.A7.81.E9.97.AE.E9.A2.98"><b>常见问题</b></span></h3> 
      <p><b>1. 部分安卓手机的web浏览器无法自动呼起微信客户端</b> </p>
      <p>6.2.5以上的Android版微信已经支持手动打开客户端后继续进行连接流程的功能，为保证此流程顺畅进行，开发者需注意以下几点： </p> 
      <pre>1.保证微信客户端版本为6.2.5以上的Android版微信；
2.参考示例demo中jsapi的写法，在无法自动跳转微信客户端时弹出提示，让用户手动切换到微信；
3.在portal页面中调用微信jsapi时，需保证AP设备的ssid和手机mac这2个参数真实有效；
4.测试过程请从切换到目标ssid动作开始（例如：原来为3G或4G网络然后手动选择目标ssid，原来为非目标ssid的wifi信号然后手动选择目标ssid，等等）。
</pre> 
      <p><b>2. IOS从portal页面跳转到微信后如何保证手机仍保持在目标ssid下？</b> </p>
      <p>IOS系统为了保证Wi-Fi是可用的，在用户选择完一个ssid后不会马上切换过去，而是会嗅探通过该ssid是否能触达公网上的预设服务，如果能嗅探到才真正显示连接该ssid。在弹portal的AP环境中，这点正好被用来弹出portal页面，如果在portal页面上完成了认证，则在portal右上方的提示会由“取消”变为“完成”，如果在“取消”状态下离开这个界面，那么刚刚选择的ssid将会被断开，回到上一个可用的连接，而如果在“完成”状态下离开这个界面则不会断开。 </p>
      <p>由于通过微信认证时，会由portal界面跳转到微信，所以确保portal右上角的“完成”状态是个前提。开发者需要注意以下几点： </p> 
      <pre>1.确保弹出portal后，临时放行手机的所有流量；
2.临时放行手机的所有流量后，局部或整体刷新portal页面触发IOS再次进行嗅探；
3.IOS嗅探可以正常触达公网上的预设服务后“取消”变为“完成”；
4.以上动作完成后，再调用跳转微信的JSAPI，继而跳转微信完成认证连接流程。
</pre> 
      <h1> <span class="mw-headline" id="PC.E7.AB.AF.E5.AE.9E.E7.8E.B0.E6.B5.81.E7.A8.8B"><b>PC端实现流程</b></span></h1> 
      <p>请按照以下步骤操作，即可在PC端使用微信连Wi-Fi。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.B8.80.E6.AD.A5.EF.BC.9A.E8.8E.B7.E5.8F.96.E9.97.A8.E5.BA.97Wi-Fi.E4.BF.A1.E6.81.AF_2"><b>第一步：获取门店Wi-Fi信息</b></span></h3> 
      <p>实现PC连Wi-Fi的第一步，是获得门店Wi-Fi信息，包括：appId，shop_id。有两种获取门店Wi-Fi信息的方法，一种是在微信公众平台微信连Wi-Fi插件中通过页面操作获得；一种是通过调用接口获得。 </p>
      <p><b>页面操作获得</b> </p>
      <p>在<a href="https://mp.weixin.qq.com/" class="external text" rel="nofollow">微信公众平台</a>开通微信连Wi-Fi插件，在【设备管理】-&gt;【添加设备】里，添加“新增微信方式连网+连网后近场服务”-&gt;”Portal型设备”；添加成功后即可获得门店Wi-Fi参数信息。 </p>
      <p>已添加设备也可在【设备详情】-&gt;【查看设备改造信息】中，获得门店Wi-Fi参数信息。 </p>
      <p><b>通过接口获得</b> </p>
      <p>调用<a href="../9/0afbb08a0f06e87dd3669a2c1e19edd5.html" class="external text" rel="nofollow">“获取WiFi门店列表”</a>接口获得shop_id，即设备要添加到的门店的ID。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E6.94.B9.E9.80.A0PC.E7.AB.AFportal.E9.A1.B5"><b>第二步：改造PC端portal页</b></span></h3> 
      <p>若连网设备为PC，在portal页中引用下述微信JSAPI，让原有的Wi-Fi portal页具备呼起微信的能力： </p> 
      <pre>&lt;script type="text/javascript"    
src="<a href="https://wifi.weixin.qq.com/resources/js/wechatticket/pcauth.js" class="external free" rel="nofollow">https://wifi.weixin.qq.com/resources/js/wechatticket/pcauth.js</a>" &gt;&lt;/script&gt;
</pre> 
      <p>调用JSAPI生成二维码，具体示例代码如下： </p> 
      <pre> &lt;script type="text/javascript"&gt;
	    JSAPI.auth({
	    	target&nbsp;: document.getElementById('qrcode_zone'),
	        appId&nbsp;: 'wx23fb4aaf04b8491e',
	        shopId&nbsp;: 6747662,
	        extend&nbsp;: 'wechatpc',
	        authUrl&nbsp;: '<a href="http://wximg.qq.com/tmt/wifi-landing-pc/dist/html/index-success.html'" class="external free" rel="nofollow">http://wximg.qq.com/tmt/wifi-landing-pc/dist/html/index-success.html'</a>
	    });
&lt;/script&gt;
</pre> 
      <p><b>参数说明</b> </p> 
      <table border="1" cellspacing="0" cellpadding="4" align="center" width="640px"> 
       <tbody>
        <tr> 
         <th style="width:160px">参数 </th> 
         <th style="width:80px">是否必须 </th> 
         <th>说明 </th>
        </tr> 
        <tr> 
         <td> target </td> 
         <td> 是 </td> 
         <td> 二维码图片放置位置 </td>
        </tr> 
        <tr> 
         <td> appId </td> 
         <td> 是 </td> 
         <td> 商家微信公众平台账号 </td>
        </tr> 
        <tr> 
         <td> shopId </td> 
         <td> 是 </td> 
         <td> 即shop_id，设备所在门店的ID（微信公众平台门店） </td>
        </tr> 
        <tr> 
         <td> extend </td> 
         <td> 是 </td> 
         <td> <b>extend里面可以放开发者需要的相关参数集合</b>，最终将透传给运营商认证URL。extend参数只支持英文和数字，且长度不得超过300个字符。 </td>
        </tr> 
        <tr> 
         <td> authUrl </td> 
         <td> 是 </td> 
         <td> 认证服务端URL，微信客户端将把用户微信身份信息向此URL提交并获得认证放行 </td>
        </tr> 
       </tbody>
      </table> 
      <p><br> </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.B8.89.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81PC.E7.AB.AF.E7.99.BD.E5.90.8D.E5.8D.95.E6.94.BE.E8.A1.8C"><b>第三步：支持PC端白名单放行</b></span></h3> 
      <p>AP/AC须对PC做白名单放行，以支持portal页面引用jsapi，以及轮询微信后台并获取openid和tid。 </p>
      <p><font color="#FF0000">请对微信连Wi-Fi的URL做白名单支持，URL为：</font> </p> 
      <pre><a href="https://wifi.weixin.qq.com/" class="external free" rel="nofollow">https://wifi.weixin.qq.com/</a>
</pre> 
      <p>以支持： </p>
      <p>1.引用jsapi： </p> 
      <pre><a href="https://wifi.weixin.qq.com/resources/js/wechatticket/pcauth.js" class="external free" rel="nofollow">https://wifi.weixin.qq.com/resources/js/wechatticket/pcauth.js</a>
</pre> 
      <p>2.轮询微信后台获取openid和tid： </p> 
      <pre><a href="https://wifi.weixin.qq.com/cgi-bin/pollpcresult" class="external free" rel="nofollow">https://wifi.weixin.qq.com/cgi-bin/pollpcresult</a>
</pre> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E5.9B.9B.E6.AD.A5.EF.BC.9A.E6.94.AF.E6.8C.81.E7.A7.BB.E5.8A.A8.E7.AB.AF.E4.B8.B4.E6.97.B6.E6.94.BE.E8.A1.8C.E4.B8.8A.E7.BD.91.E8.AF.B7.E6.B1.82"><b>第四步：支持移动端临时放行上网请求</b></span></h3> 
      <p>请参考移动端实现流程的第三步，支持移动端临时放行上网请求。 </p> 
      <h3> <span class="mw-headline" id=".E7.AC.AC.E4.BA.94.E6.AD.A5.EF.BC.9A.E6.8E.A5.E5.8F.97.E5.BE.AE.E4.BF.A1.E8.BA.AB.E4.BB.BD.E8.AE.A4.E8.AF.81.E6.94.BE.E8.A1.8C"><b>第五步：接受微信身份认证放行</b></span></h3> 
      <p>请参考移动端实现流程的第四步，接受微信身份认证并放行。 </p> 
      <h3> <span class="mw-headline" id="PC.E7.AB.AFportal.E9.A1.B5.E7.A4.BA.E4.BE.8BDemo"><b>PC端portal页示例Demo</b></span></h3> 
      <p>请参考示例Demo，进行PC端Portal页面改造（JS代码直接在页面中）： </p>
      <p><a href="https://wifi.weixin.qq.com/operator/demoForPc.xhtml" class="external free" rel="nofollow">https://wifi.weixin.qq.com/operator/demoForPc.xhtml</a> </p> 
      <!-- 
NewPP limit report
Preprocessor node count: 83/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Expensive parser function count: 0/100
--> 
      <div class="printfooter">
        取自“
       <a href="../10/0ef643c7147fdf689e0a780d8c08ab96.html">../10/0ef643c7147fdf689e0a780d8c08ab96.html</a>”
      </div> 
      <!-- /bodytext --> 
      <!-- catlinks --> 
      <div id="catlinks" class="catlinks catlinks-allhidden"></div> 
      <!-- /catlinks --> 
      <div class="visualClear"></div> 
     </div> 
     <!-- /bodyContent --> 
    </div> 
    <!-- /content --> 
   </div> 
  </div> 
  <!-- footer --> 
  <div class="foot" id="footer"> 
   <ul class="links ft" id="footer-places"> 
    <li class="links_item no_extra" id="footer-about"><a target="_blank" href="http://www.tencent.com/zh-cn/index.shtml">关于腾讯</a></li> 
    <li class="links_item" id="footer-policy"> <a target="_blank" href="#">服务协议</a></li> 
    <li class="links_item" id="footer-contactus"><a target="_blank" href="http://kf.qq.com/special_auto/weixin.html">客服中心</a></li> 
    <li class="links_item" id="footer-contactus"><a href="http://crm2.qq.com/page/portalpage/wpa.php?uin=40012345&amp;f=1&amp;ty=1&amp;ap=000011:400792:|f:Ggzpt1" target="_blank">在线客服</a></li> 
   </ul> 
   <ul id="footer-icons" class="noprint"> 
    <li id="footer-poweredbyico"> <a href="http://www.mediawiki.org/"><img src="../static/assets/1360f2593ddc8c336d455df43678bb00.png" alt="Powered by MediaWiki" width="88" height="31"></a> </li> 
   </ul> 
   <p class="copyright">Copyright&nbsp;© 2012-2016 Tencent. All Rights Reserved.</p> 
  </div> 
  <!-- /footer --> 
  <script src="../static/8de4f51dbc81a02504e69db45b414107.css"></script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "Wi-Fi硬件鉴权协议接口说明", "wgTitle": "Wi-Fi硬件鉴权协议接口说明", "wgAction": "view", "wgArticleId": 225, "wgIsArticle": true, "wgUserName": null, "wgUserGroups": ["*"], "wgCurRevisionId": 3946, "wgCategories": [], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
}
</script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.loader.load(["mediawiki.util", "mediawiki.legacy.wikibits", "mediawiki.legacy.ajax"]);
	mediaWiki.loader.go();
}
</script> 
  <script>if ( window.mediaWiki ) {
	mediaWiki.user.options.set({"ccmeonemails":0,"cols":80,"contextchars":50,"contextlines":5,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"highlightbroken":1,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":1,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
	"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh-cn","language":"zh-cn","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false});;mediaWiki.loader.state({"user.options":"ready"});
}
</script> 
  <!-- fixalpha --> 
  <script type="text/javascript"> if ( window.isMSIE55 ) fixalpha(); </script> 
  <!-- /fixalpha --> 
  <!-- Served in 0.166 secs. --> 
  <script type="text/javascript">
		// @cunjinli
		setTimeout(function() {
			$("#mw-panel .portal .body li a").each(function() {
				var href = $(this).attr("href"),
				    idx = href.lastIndexOf("/");
				if (!/\.html$/.test(href)) return;

				if (idx>=0) href = href.substr(idx+1);
				var r = new RegExp(href+"$");
				if (r.test(location.href)) {
				    $(this).closest(".portal").find("h5").click();
				    return false;
				}
			});
		}, 100);
		</script>   
  <!-- Welcome to ask gy-team -->
  <!-- so -->
 </body>
</html>